using ViewModels.Reuqest;
using System;
using System.Collections.Generic;
using System.IO;
using System.Threading.Tasks;
using DbModel;
using DbModel.domain;
using ServicesModel;

namespace Repository.Interface
{
    /// <summary>
    /// app版本表接口
    /// </summary>
    public interface IAppVersionRespository : IRepository<AppVersion>
    {
        /// <summary>
        /// 获取app版本表列表
        /// </summary>
        Task<Tuple<long, List<AppVersion>>> GetAppVersionList(AppVersionVm model);

        /// <summary>
        /// 添加或修改app版本表
        /// </summary>
        string AddAppVersion(AppVersion model);

        /// <summary>
        /// 删除app版本表
        /// </summary>
        Task<string> DelAppVersion(long tid);

        /// <summary>
        /// 下载导入app版本表的Excel模板
        /// </summary>
        Tuple<string, byte[]> ExcelTemplete();

        /// <summary>
        /// 根据app版本表的Excel模板导入
        /// </summary>
        Tuple<bool, string> Upload(Stream inputFileStream, string userName);

        /// <summary>
        /// 导出app版本表的Excel
        /// </summary>
        Task<List<AppVersionSM>> Export(AppVersionVm model);
    }
}